]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ibusManager: Fix a warning
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 13 Jun 2017 03:03:17 +0000 (05:03 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 13 Jul 2017 15:23:54 +0000 (17:23 +0200)
Don't try to access a non-existent engine - it probably makes sense to
use Map() instead of a plain object to track engines in the future, but
for now just add an additional check to shut up a warning.

https://bugzilla.gnome.org/show_bug.cgi?id=781471

js/misc/ibusManager.js

index adf57b3c826e0cb7026a8e08ca3c4fa7aa9e9cdd..8c812feb10c803faa954cdcce419bde704d64ba7 100644 (file)
@@ -190,7 +190,7 @@ const IBusManager = new Lang.Class({
     },
 
     getEngineDesc: function(id) {
-        if (!IBus || !this._ready)
+        if (!IBus || !this._ready || !this._engines.hasOwnProperty(id))
             return null;
 
         return this._engines[id];